import request from "@/utils/request";

/**
 * 获取代理人列表
 */
export function httpUmsMemberPageMember(params = {}) {
  return request({
    url: "/umsMember/pageMember",
    method: "post",
    data: {
      // 组织编码
      organizationCode: params.organizationCode,
      // 手机号
      phone: params.phone,
      // 用户
      userName: params.userName,
      pageNum: params.pageNum,
      pageSize: params.pageSize,
    },
  });
}

/**
 * 新增代理人
 */
export function httpUmsMemberSaveMember(data) {
  return request({
    url: "/umsMember/saveMember",
    method: "post",
    data,
  });
}

/**
 * 修改代理人状态
 */
export function httpUmsMemberUpdateMemberStatus(data) {
  return request({
    url: `/umsMember/updateMemberStatus/${data.id}/${data.status}`,
    method: "post",
  });
}
